/*
 * @Author: your name
 * @Date: 2021-09-16 15:02:51
 * @LastEditTime: 2022-05-24 17:57:02
 * @LastEditors: error: git config user.name && git config user.email & please set dead value or install git
 * @Description: In User Settings Edit
 * @FilePath: \FR5086_CM3Peripherals\examples\none_evm\ble_simple_peripheral\code\sd_dev_uart.h
 */
/**
  ******************************************************************************
  * @file    xxx.c 
  * @author  SD Electronics xxx
  * @version V1.0
  * @date    xx-xx-xx
  * @brief   xxxxxxxxxxxxxxxxxx.
  ******************************************************************************
  */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef _SD_DEV_UART_H
#define _SD_DEV_UART_H


/* Includes ------------------------------------------------------------------*/
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include "driver_iomux.h"
#include "sd_common.h"


/** 
  * @brief 串口参数
  */
typedef struct
{
    uint8_t ucUsartIndex;                      
    unsigned long ulBaudRate;                  
    unsigned short uldata_bit;                  
    unsigned short usParity;                    
    unsigned short usStopBits;                  /* 停止位 */
    uint8_t     AT_TransferMode;                /* 串口透传模式 */
}ST_USART_CNT_PHY,*PST_USART_CNT_PHY;

/** 
  * @串口索引--几路串口
  */
typedef enum
{
    USART_INDEX_1 = 0,
    USART_INDEX_2	,
    USART_INDEX_3	,
    USART_INDEX_4   ,
    USART_INDEX_5	,
    USART_INDEX_6	,
    USART_INDEX_7	,	
    USART_INDEX_MAX ,
}EN_USART_DEFINE;

/** 
  * @brief USRT结构体
  */
typedef struct
{
	bool	bInitFlag;	        /* 初始化完成标志 */
	PST_USART_CNT_PHY	pstUsartInfo;
}ST_USART_CTRL, *PST_USART_CTRL;  


/** 
  * @brief  串口透传模式
  */ 
typedef enum
{
    EN_UART_TRANSMODE_ATCMD,      /* AT命令 */
    EN_UART_TRANSMODE_TRANSFER,     /* 透传 */
}EN_UART_TRANSMODE;


/** 
  * @brief  函数声明
  */ 
uint8_t SDGetUart_TPMODE(void);

#endif
/******************* (C) COPYRIGHT 2011 ShenZhenShiding electronics **************************/
